#{extends 'main.html' /}
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Come Back Sheet</title>
</head>
<head>

</head>

<body>

	<table width="100%" class="hovertable">
		<tr>
			<th>Name 1</th>
			<th>Name 2</th>
			<th>Address</th>
			<th>Mobile Numbers</th>
			<th>Phone Numbers</th>
			<th>Contract ID</th>
			<th>Contract Year</th>
			<th>Products</th>
			<th>Floor Type</th>
			<th>Quantity</th>
			<th>Price</th>
			<th>Smell</th>
			<th>Enter data</th>

			<th>Clean List</th>
			<th>Dirty List</th>
			<th>Cancel List</th>
			<th>New List</th>
		</tr>

		#{list items:renderReportList, as:'report'}
		<tr onmouseover="this.style.backgroundColor='#ffff66';"
			onmouseout="this.style.backgroundColor='#d4e3e5';">
			<td>${report.contract.name1}</td>
			<td>${report.contract.name2}</td>
			<td>${report.contract.address}</td>
			<td>${report.contract.mobile1} <br />${report.contract.mobile2}
			</td>
			<td>${report.contract.phone1} <br />${report.contract.phone2}</td>

			<td>${report.contract.contract_id}</td>
			<td>${report.contract.year}</td>
			<td>

				<ul>
					#{list items:report.contract.productList, as:'p'}

					<li>${p.name}</li> #{/list}
				</ul>
			</td>

			<td>

				<ul>
					#{list items:report.contract.productList, as:'p'}

					<li>${p.floor_type}</li> #{/list}
				</ul>
			</td>

			<td>
				<ul>
					#{list items:report.contract.productList, as:'p'}

					<li>${p.quantity}</li> #{/list}
				</ul>
			</td>
			<td>
				<ul>
					#{list items:report.contract.productList, as:'p'}

					<li>${p.price}</li> #{/list}
				</ul>
			</td>

			<td>
				<ul>
					#{list items:report.contract.productList, as:'p'}

					<li>${p.smell}</li> #{/list}
				</ul>
			</td>
			<td>
				<form action="@{Application.carReturn(report.contract.id)}"
					method="post">
					Cash Receipt : <input type="text" name="cash_receipt"
						style="width: 50px" /> <br> <input type="checkbox"
						name="NEW" value="true" />New <input type="checkbox"
						name="cancel" value="true" />Cancel<br> <input type="submit"
						value="Save" />
				</form>
			</td>

			<td>
				<ul>
					#{list items:report.cleanList, as:'p'}

					<li>${p.name}</li> #{/list}
				</ul>
			</td>


			<td>
				<ul>
					#{list items:report.dirtyList, as:'p'}

					<li>${p.name}</li> #{/list}
				</ul>
			</td>
			<td>

				<ul>
					#{list items:report.cancelList, as:'p'}

					<li>${p.name}</li> #{/list}
				</ul>
			</td>


			<td>
				<ul>
					#{list items:report.newList, as:'p'}

					<li>${p.name}</li> #{/list}
				</ul>
			</td>
			
			
			<td>
				<a href="@{Application.clearReport(report.id)}">Clear</a>
			</td>

		</tr>


		#{/list}
	</table>



	</table>

</body>

</html>